package com.example.springboot2.xdkt.domain;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;

@ToString
public class JsonData implements Serializable {

    /**
     * 添加序列化的唯一标识
     */
    private static final long serialVersionUID = 1L;



    //状态码,0表示成功 -1表示失败
    @Setter
    @Getter
    private int code;

    //结果
    @Setter
    @Getter
    private Object data;

    @Setter
    @Getter
    private String msg;

    public JsonData() {

    }

    public JsonData(int code, Object data) {
        this.code = code;
        this.data = data;
    }

    public JsonData(int code, Object data, String msg) {
        this.code = code;
        this.data = data;
        this.msg = msg;
    }


    public JsonData(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }



}


